import type { RouteRecordRaw } from 'vue-router'

const routes: Array<RouteRecordRaw> = [
    {
        id: "1",
        path: "/login",
        name: "Login",
        component: ()=>import("@/views/login/Login.vue")
    },
    {
        id: "2",
        path: "/",
        name: "Home",
        component: ()=>import("@/views/layout/Layout.vue"),
        redirect: "/index",
        children: [
            {
                id: "21",
                path: "/index",
                name: "HomeIndex",
                component: ()=>import("@/views/home/index/IndexView.vue"),
                meta: {
                    title: "首页",
                    keeplive: false,
                    show: true
                }
            },
            // 用户管理
            {
                id: "31",
                name: "Users",
                meta: {
                    title: "用户管理",
                    keeplive: false,
                    show: true
                },
                children: [ 
                    {
                        id: "223",
                        path: "/users/permission",
                        name: "Users:permission",
                        component: ()=>import("@/views/home/userManage/PermissionList.vue"),
                        meta: {
                            title: "权限列表",
                            keeplive: false,
                            show: true
                        }
                    },
                    {
                        id: "222",
                        path: "/users/role",
                        name: "Users:role",
                        component: ()=>import("@/views/home/userManage/RoleList.vue"),
                        meta: {
                            title: "角色列表",
                            keeplive: false,
                            show: true
                        }
                    },
                    {
                        id: "221",
                        path: "/users/user",
                        name: "Users:user",
                        component: ()=>import("@/views/home/userManage/UserList.vue"),
                        meta: {
                            title: "用户列表",
                            keeplive: false,
                            show: true
                        }
                    },
                ]
            },
            {
                id: "71",
                name: "Members",
                meta: {
                    title: "会员管理",
                    keeplive: false,
                    show: true
                },
                children:[
                    {
                        id: "711",
                        path: "/members/member",
                        name: "Members:member",
                        component: ()=>import("@/views/home/memberManage/MemberList.vue"),
                        meta: {
                            title: "会员列表",
                            keeplive: false,
                            show: true
                        }
                    }
                ]
            },
            {
                id: "41",
                name: "Goods",
                meta: {
                    title: "商品管理",
                    keeplive: false,
                    show: true
                },
                children: [
                    {
                        id: "411",
                        path: "/goods/category",
                        name: "Goods:category",
                        component: ()=>import("@/views/home/goodsManage/GoodsCategory.vue"),
                        meta: {
                            title: "商品分类",
                            keeplive: false,
                            show: true
                        }
                    },
                    {
                        id: "412",
                        path: "/goods/good",
                        name: "Goods:good",
                        component: ()=>import("@/views/home/goodsManage/GoodsList.vue"),
                        meta: {
                            title: "商品列表",
                            keeplive: false,
                            show: true
                        }
                    },
                    {
                        id: "413",
                        path: "/goods/comment",
                        name: "Goods:comment",
                        component: ()=>import("@/views/home/goodsManage/GoodsComment.vue"),
                        meta: {
                            title: "商品评论",
                            keeplive: false,
                            show: true
                        }
                    },
                    {
                        id: "414",
                        path: "/goods/collection",
                        name: "Goods:collection",
                        component: ()=>import("@/views/home/goodsManage/GoodsCollection.vue"),
                        meta: {
                            title: "商品收藏",
                            keeplive: false,
                            show: true
                        }
                    },
                    {
                        id: "415",
                        path: "/goods/add",
                        name: "Goods:add",
                        component:()=>import("@/views/home/goodsManage/GoodsAdd.vue"),
                        meta: {
                            title: "新增商品",
                            keeplive: false,
                            show: false
                        }
                    }
                ]
            },
            {
                id: "81",
                name: "Coupons",
                meta: {
                    title: "优惠券管理",
                    keeplive: false,
                    show: true
                },
                children: [
                    {
                        id: "811",
                        path: "/coupons/coupon",
                        name: "Coupons:coupon",
                        component: ()=>import("@/views/home/couponManage/CouponList.vue"),
                        meta: {
                            title: "优惠券列表",
                            keeplive: false,
                            show: true
                        }
                    }
                ]
            },
            //订单管理
            {
                id: "51",
                name: "Orders",
                meta: {
                    title: "订单管理",
                    keeplive: false,
                    show: true
                },
                children: [
                    {
                        id: "511",
                        path: "/orders/order",
                        name: "Orders:order",
                        component: ()=>import("@/views/home/orderManage/UserOrderList.vue"),
                        meta: {
                            title: "用户订单列表",
                            keeplive: false,
                            show: true
                        }
                    },
                    {
                        id: "512",
                        path: "/orders/score",
                        name: "Orders:score",
                        component: ()=>import("@/views/home/orderManage/UserScoreList.vue"),
                        meta: {
                            title: "用户积分列表",
                            keeplive: false,
                            show: true
                        }
                    },
                    {
                        id: "513",
                        path: "/orders/coupon",
                        name: "Orders:coupon",
                        component: ()=>import("@/views/home/orderManage/UserCouponList.vue"),
                        meta: {
                            title: "用户优惠券列表",
                            keeplive: false,
                            show: true
                        }

                    },
                    {
                        id: "514",
                        path: "/orders/account",
                        name: "Orders:account",
                        component: ()=>import("@/views/home/orderManage/UserAccountList.vue"),
                        meta: {
                            title: "用户账单列表",
                            keeplive: false,
                            show: true
                        }
                    }
                ]
            },
            // 系统管理
            {
                id: "61",
                name: "Systems",
                meta: {
                    title: "系统管理",
                    keeplive: false,
                    show: true
                },
                children: [
                    {
                        id: "611",
                        path: "/banner",
                        name: "Systems:banner",
                        component: ()=>import("@/views/home/systemManage/BannerList.vue"),
                        meta: {
                            title: "轮播图列表",
                            keeplive: false,
                            show: true
                        }
                    },
                    {
                        id: "612",
                        path: "/feedback",
                        name: "Systems:feedback",
                        component: ()=>import("@/views/home/systemManage/FeedbackList.vue"),
                        meta: {
                            title: "用户反馈列表",
                            keeplive: false,
                            show: true
                        }
                    },
                    {
                        id: "613",
                        path: "/version",
                        name: "Systems:version",
                        component: ()=>import("@/views/home/systemManage/VersionList.vue"),
                        meta: {
                            title: "版本列表",
                            keeplive: false,
                            show: true
                        }
                    },
                    {
                        id: "614",
                        path: "/messagelog",
                        name: "Systems:messagelog",
                        component: ()=>import("@/views/home/systemManage/MessageLog.vue"),
                        meta: {
                            title: "短信日志",
                            keeplive: false,
                            show: true
                        }
                    },
                ]
                
            }
        ]
    }
]

export { routes }